<?php

define('ENVIRONMENT', 'development');

if (defined('ENVIRONMENT'))
{
	switch (ENVIRONMENT)
	{
		case 'development':
			error_reporting(E_ALL);
			break;

		case 'testing':
			error_reporting(E_ALL);
			break;
				
		case 'production':
			error_reporting(0);
			break;

		default:
			exit('The application environment is not set correctly.');
	}
}

// Set the current directory correctly for CLI requests
if (defined('STDIN'))
{
	chdir(dirname(__FILE__));
}
$base_path = realpath('.').'/';
define('BASEPATH', $base_path);

require 'core/common.php';
require 'config/database.php';
require 'config/constant.php';

require 'controller/controller_friend.php';